﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebMotel._Default" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    <link href="Styles/Css3.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">




          function load() {
              Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
          }

          function EndRequestHandler() {
              mask();
          }

          function mask() {
              $('#<%=txtCheckIN_Data.ClientID %>').setMask('date');
              $('#<%=txtCheckIN_Hora.ClientID %>').setMask('time');

              $('#<%=txtPagar_VlrTotal.ClientID %>').setMask('decimal');
              $('#<%=txtPagar_VlrJaPago.ClientID %>').setMask('decimal');
              $('#<%=txtPagar_VlrAPagar.ClientID %>').setMask('decimal');
              $('#<%=txtPagar_VlrRecebido.ClientID %>').setMask('decimal');
              $('#<%=txtPagar_VlrTroco.ClientID %>').setMask('decimal');

              $('#<%=txtPagar_VlrDesconto.ClientID %>').setMask('decimal');

              
          }
          $(document).ready(mask);

//          var tempo = new Date;
//          var divIDModivificada = '';

//          function tFuncDavi(dt, divID) {
//              // Esta variável marca o início da execução do script em milissegundos
//              var dtAgora = new Date;
//              var dtPassada = new Date(dt)

//              tempo = dtPassada;
//              divIDModivificada = divID;

//              var hor = dtAgora.getHours() - dtPassada.getHours();
//              var min = dtAgora.getMinutes() - dtPassada.getMinutes();
//              var sec = dtAgora.getSeconds();


//              // Corrigindo Bug de ter passado 1 Dia
//              var dia = dtAgora.getDay() - dtPassada.getDay();
//              for (var i = 0; i < dia; i++) {
//                  hor += 24;
//              }
//              var tempDecorrito = ("00" + hor).toString().slice(-2) + ":" + ("00" + min).toString().slice(-2) + ":" + ("00" + sec).toString().slice(-2);

//              tFunc();
//          }

//          function tFunc() {
//              // Esta variável marca o início da execução do script em milissegundos
//              var dtAgora = new Date;
//              var dtPassada = tempo;

//              tempo = dtPassada;

//              var hor = dtAgora.getHours() - dtPassada.getHours();
//              var min = dtAgora.getMinutes() - dtPassada.getMinutes();
//              var sec = dtAgora.getSeconds();


//              // Corrigindo Bug de ter passado 1 Dia
//              var dia = dtAgora.getDay() - dtPassada.getDay();
//              for (var i = 0; i < dia; i++) {
//                  hor += 24;
//              }

//              hor = hor.toString().replace('-', '');
//              min = min.toString().replace('-', '');
//              sec = sec.toString().replace('-', '');

//              var tempDecorrito = ("00" + hor).toString().slice(-2) + ":" + ("00" + min).toString().slice(-2) + ":" + ("00" + sec).toString().slice(-2);

//              document.getElementById(divIDModivificada).innerHTML = tempDecorrito;
//              var interv = window.setTimeout("tFunc()", 1000)
//          }




          //var myVar = setInterval(function () { myTimer('demo') }, 1000);


//          function myTimer(dt, divID) {
//              var dtAgora = new Date;
//              var dtPassada = new Date(dt);

//              var hor = dtAgora.getHours() - dtPassada.getHours();
//              var min = dtAgora.getMinutes() - dtPassada.getMinutes();
//              var sec = dtAgora.getSeconds();


//              // Corrigindo Bug de ter passado 1 Dia
//              var dia = dtAgora.getDay() - dtPassada.getDay();
//              for (var i = 0; i < dia; i++) {
//                  hor += 24;
//              }

//              hor = hor.toString().replace('-', '');
//              min = min.toString().replace('-', '');
//              sec = sec.toString().replace('-', '');


//              var tempDecorrito = ("00" + hor).toString().slice(-2) + ":" + ("00" + min).toString().slice(-2) + ":" + ("00" + sec).toString().slice(-2);
//              document.getElementById(divID).innerHTML = tempDecorrito;
          //          }



          function tFunc(tempo, divID) {
              var data = new Date(tempo);

              //data.setSeconds(data.getSeconds() + tempo.getSeconds())

              myTimer(data, divID)
              var myVar = setInterval(function () { myTimer(data, divID) }, 1000);
          }

          function myTimer(data, divID) {
              var d = new Date();
              //d.setHours(d.getHours() - data.getHours())

              var hor = d.getHours() - data.getHours();
              var min = d.getMinutes() - data.getMinutes();
              var sec = d.getSeconds() - data.getSeconds();

              // Corrigindo Bug de ter passado 1 Dia
              var dia = d.getDay() - data.getDay();
              for (var i = 0; i < dia; i++) {
                  hor += 24;
              }

              hor = hor.toString().replace('-', '');
              min = min.toString().replace('-', '');
              sec = sec.toString().replace('-', '');

              var tempDecorrito = ("00" + hor).toString().slice(-2) + ":" + ("00" + min).toString().slice(-2) + ":" + ("00" + sec).toString().slice(-2);
              document.getElementById(divID).innerHTML = tempDecorrito;

              //              var t = d.toLocaleTimeString();
              //              document.getElementById(divID).innerHTML = t;
          }




          function calculaDesconto() {

              var vlrDesconto = document.getElementById("<%= txtPagar_VlrDesconto.ClientID %>").value.toString().replace('.', '').replace(',', '.');
              var vlrTotal = document.getElementById("<%= txtPagar_VlrTotal.ClientID %>").value.toString().replace('.', '').replace(',', '.');
              var vlrJaPago = document.getElementById("<%= txtPagar_VlrJaPago.ClientID %>").value.toString().replace('.', '').replace(',', '.');
              var vlrAPagar = document.getElementById("<%= txtPagar_VlrAPagar.ClientID %>").value.toString().replace('.', '').replace(',', '.');


              var total = parseFloat((parseFloat(vlrTotal).toFixed(2) - parseFloat(vlrJaPago).toFixed(2)) - parseFloat(vlrDesconto).toFixed(2)).toFixed(2);

              if (total >= 0) {
                  document.getElementById("<%= txtPagar_VlrAPagar.ClientID %>").value = total;
                  $('#<%=txtPagar_VlrAPagar.ClientID %>').setMask('decimal');
              }
              else {
                  alert("O valor do desconto não pode ser superior ao valor a pagar!");
              }

              calculaTroco();
          }

          function calculaTroco() {

              var vlrAPagar = document.getElementById("<%= txtPagar_VlrAPagar.ClientID %>").value.toString().replace('.', '').replace(',', '.');
              var vlrRecebido = document.getElementById("<%= txtPagar_VlrRecebido.ClientID %>").value.toString().replace('.', '').replace(',', '.');


              var troco = parseFloat(parseFloat(vlrRecebido).toFixed(2) - parseFloat(vlrAPagar).toFixed(2)).toFixed(2);

              if (troco >= 0) {
                document.getElementById("<%= txtPagar_VlrTroco.ClientID %>").value = troco;
                $('#<%=txtPagar_VlrTroco.ClientID %>').setMask('decimal');
              }
              else
                  document.getElementById("<%= txtPagar_VlrTroco.ClientID %>").value = "0,00";
          }

    </script>
  <style type="text/css">
      
      .div_legendaFlutuante
      {
            margin: 0;
            display:block;
            position:fixed;
            width:140px;
            height:130px;
            bottom: 0px;
            right:0px;
            color:#A1A1A1;
            z-index:100;
            background-color:transparent;
            text-align:right;
            font-weight:normal;
            /*border:1px solid #a1a1a1;*/
      }
        .modal
        {
            width: 100%;
            height: auto;
            float:left;
            top: 0;
            margin: 0;
            left: 0;
            margin-top:0px;
            display: none;
            z-index: 999;
            background: rgba(0,0,0,0.5);
            -webkit-animation-duration: 1s;
            -webkit-animation-name: fade;
            -webkit-animation-iteration-count: 1;
            -webkit-animation-direction: normal;
            visibility:inherit;  
        }
                
         .modal_inside
        {
            float:left;
            margin:10% 0px 0px 20%;            
            padding:0px 5px 5px 5px;
            
            
            width:60%;
            height:auto;
            
            background-color:#FFFFFF;
            -moz-border-radius:5px;
            webkit-border-radius:5px;
            border-radius: 5px;
            
            
            border:1px solid #CCCCCC;
            
            -moz-box-shadow:    0px 1px 3px 1px #1b1b1b;
            -webkit-box-shadow: 0px 1px 3px 1px #1b1b1b;
            box-shadow:         0px 1px 3px 1px #1b1b1b;
  
            <strong>behavior:url(border-radius.htc);</strong>
            
            
            
        }
        
        .modal a
        {
            display: block;
            vertical-align: middle;
            text-align: center;    
        }
        
        .modal img
        {
            padding: 5px 5px 45px 5px;
            background: #ffffff;
            -webkit-box-shadow: 0px 0px 15px #444;
            -moz-box-shadow: 0px 0px 15px #444;
            -webkit-animation-duration: 0.50s;
            -webkit-animation-name: grow;
            -webkit-animation-iteration-count: 1;
            -webkit-animation-direction: normal;
            -webkit-animation-timing-function: ease-in;
        }
        
        .hfCampoConfirmacao
        {
            color:White;    
        }
        
        .modal:target
        {
            display: table;
            height:100%;
        }
        
        #div_modal_conteudo
        {
            margin-top:155px;
            background-color: White;
            height:200px;
            width:400px;
            border: 3px solid #660000;
            -moz-border-radius: 10px;
            -webkit-border-radius: 10px;
            -webkit-box-shadow:0px 5px 5px #555;
            -moz-box-shadow:0px 5px 5px #555;
        }
        
        #botao_fechar_modal
        {
            text-align:center;
        }
    </style>

    <script type="text/javascript">
           function OnProdutoSelected(source, eventArgs) {
               var results = eval('(' + eventArgs.get_value() + ')');

               document.getElementById('<%=txtADDItem_DescricaoProdutoID.ClientID %>').value = results;
           }
    </script>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">

      <div runat="server" id="divMensagem" class="mensagem">
                    <p runat="server" id="pMensagem"></p>
            </div>
               <!-- FORM Finaliza e Imprimir Comanda -->

            <div id="div_Comanda" class="modal FadeinModal">
            <div class="fadeIn">
                <div class="modal_inside">
                    <h3 class="header smaller lighter blue">
                        <div class="btn btn-info btn-mini">
                            <i class="fa fa-sign-in bigger-150 icon-only"></i>
                        </div>
                         Imprimir Comanda
                         
                         <i class="icon-double-angle-right"></i> <asp:Label ID="lblComanda_DescricaoAcomodoacao" runat="server" Text=""></asp:Label>
                         <asp:Label ID="lblComanda_ID" runat="server" Text=""></asp:Label>
                         
                    </h3>
                    
                    <div style="float:left; width:100%; height:auto; margin:0px 0px 0px 0px;">
               
                        <h4>Deseja realmente Encerrar e Imprimir esta Comanda?</h4>

                    </div>

                    <br clear="all" />
                     
                    <div style="float:left; width:100%; height:auto; margin:10px 0px 10px 0px;">
                        <div style="float:left; height:auto; margin-right:10px;">
                            <a href="#" class="btn btn-prev" >
                                <i class="icon-arrow-left"></i>
                                Não
                           </a>                          
                        </div>

                        <div style="float:left; height:auto; margin-right:10px;">
                            <asp:LinkButton class="btn btn-info" runat="server" ID="btnComandaSalvar" OnClick="btnComandaSalvar_OnClick">
                                <i class="icon-save bigger-110"></i>
                                Sim
                           </asp:LinkButton>                            
                        </div>
                    </div>

                    <hr />

                </div>
            </div>
            </div>

        <!-- FIM FORM Finaliza e Imprimir Comanda -->
        <!-- FORM CHECK-IN -->

            <div id="div_CheckIN" class="modal FadeinModal">
            <div class="fadeIn">
                <div class="modal_inside">
                    <h3 class="header smaller lighter blue">
                        <div class="btn btn-info btn-mini">
                            <i class="fa fa-sign-in bigger-150 icon-only"></i>
                        </div>
                         CheckIN
                         
                         <i class="icon-double-angle-right"></i> <asp:Label ID="lblCheckIN_DescricaoAcomodacao" runat="server" Text=""></asp:Label>
                         <asp:Label ID="lblCheckIN_AcomodacaoID" runat="server" Text=""></asp:Label>
                         
                    </h3>
                    
                    <div style="float:left; width:100%; height:auto; margin:0px 0px 0px 0px;">
                        <div style="float:left; height:auto; margin-right:10px;">
                            <label for="id-date-picker-1">Data:</label>
                            <div class="input-prepend">
                                <span class="add-on"><i class="icon-calendar"></i></span>
                                <asp:TextBox ID="txtCheckIN_Data" class="ace-tooltip" runat="server" Width="80px" />
                                <asp:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="txtCheckIN_Data" MaskType="Date" Mask="99/99/9999"> </asp:MaskedEditExtender>
                            </div>
                        </div>
                        <div style="float:left; height:auto; margin-right:10px;">
                            <label for="id-date-picker-1">Hora:</label>
                            <div class="input-prepend">
                                    <span class="add-on"><i class="icon-time"></i></span>
                                    <asp:TextBox ID="txtCheckIN_Hora" class="ace-tooltip" runat="server" Width="80px" />
                            </div>
                        </div>
                        <div style="float:left; height:auto; margin-right:10px;">
                            <label for="id-date-picker-1">Placa:</label>
                            <asp:TextBox ID="txtCheckIN_Placa" class="ace-tooltip" runat="server" Width="80px" />
                        </div>
                    </div>

                    <br clear="all" />
                    <div style="float:left; width:100%; height:auto; margin:0px 0px 0px 0px;">
                        <label for="id-date-picker-1">Observaões:</label>
                         <asp:TextBox ID="txtCheckIN_Observações" class="ace-tooltip" runat="server" Width="790px" />
                    </div>
                     
                    <div style="float:left; width:100%; height:auto; margin:0px 0px 10px 0px;">
                        <div style="float:left; height:auto; margin-right:10px;">
                            <a href="#" class="btn btn-prev" >
                                <i class="icon-arrow-left"></i>
                                Voltar
                           </a>                          
                        </div>

                        <div style="float:left; height:auto; margin-right:10px;">
                            <asp:LinkButton class="btn btn-info" runat="server" ID="btnCheckIN_Salvar" OnClick="btnCheckIN_Salvar_OnClick">
                                <i class="icon-save bigger-110"></i>
                                Salvar
                           </asp:LinkButton>                            
                        </div>
                    </div>

                    <hr />

                </div>
            </div>
            </div>

        <!-- FIM FORM CHECK-IN -->

   
       <!-- FORM ADD ITEM -->

            <div id="div_addItem" class="modal FadeinModal">
                <div class="fadeIn">
                <div class="modal_inside">
                    <h3 class="header smaller lighter blue">
                        <div class="btn btn-info btn-mini">
                            <i class="fa-plus-square bigger-125 icon-only"></i>
                        </div>
                         Incluir Item na Comanda  
                         
                         <i class="icon-double-angle-right"></i> <asp:Label ID="lblADDItem_DescricaoAcomodacao" runat="server" Text=""></asp:Label>
                         <asp:Label ID="lblADDItem_AcomodacaoID" runat="server" Text=""></asp:Label>
                         
                    </h3>

                     <div style="float:left; width:100%; height:auto; margin:10px 0px 0px 0px;">
                        <div style="float:left; height:auto; margin-right:10px;">
                             <label for="id-date-picker-1">ID:</label>
                            <asp:TextBox ID="txtADDItem_DescricaoProdutoID" class="ace-tooltip" runat="server" Width="60px" />
                        </div>
                        <div style="float:left; height:auto; margin-right:10px;">
                            <label for="id-date-picker-1">Produto:</label>
                            <div class="input-prepend">
                                <span class="add-on">
                                <i class="icon-search"></i>
                                </span>
                                <asp:TextBox ID="txtADDItem_DescricaoProduto" class="ace-tooltip" runat="server" Width="495px" />
                            </div>
                            <asp:AutoCompleteExtender ID="ACE_txtADDItem_DescricaoProduto" runat="server"
                                                TargetControlID="txtADDItem_DescricaoProduto" ServiceMethod="GetSugestoesProdutos"
                                                MinimumPrefixLength="1"  CompletionInterval="500"
                                                EnableCaching="true" CompletionSetCount="10" OnClientItemSelected="OnProdutoSelected"
                                                CompletionListCssClass="completionList"
                                                CompletionListHighlightedItemCssClass="itemHighlighted"
                                                CompletionListItemCssClass="listItem" >
                            </asp:AutoCompleteExtender>
                        </div>
                        <div style="float:left; height:auto; margin-right:10px;">
                            <label for="id-date-picker-1">Quantidade:</label>
                            <asp:TextBox ID="txtADDItem_Quantidade" class="ace-tooltip" runat="server" Width="60px" />
                        </div>                   
                    </div>
                    <br clear="all" />
                    <div style="float:left; width:100%; height:auto; margin:10px 0px 0px 0px;">
                        <div style="float:left; height:auto; margin-right:10px;">
                            <label for="id-date-picker-1">Observacões:</label>
                            <asp:TextBox ID="txtADDItem_Observacoes" class="ace-tooltip" runat="server" Width="660px" />
                        </div>  
                    </div>
                    <br clear="all" />
                    <div style="float:left; width:100%; height:auto; margin:10px 0px 0px 0px;">
                         <div style="float:left; height:auto; margin-right:10px;">
                            <a href="#" class="btn btn btn-small btn-prev" >
                                <i class="icon-arrow-left"></i>
                                Voltar
                           </a>                          
                        </div>
                        <div style="float:left; height:auto; margin-right:10px;">
                            <asp:LinkButton class="btn btn btn-small btn-info" runat="server" ID="btnAddItem" OnClick="btnAddItem_AddPedido_OnClick">
                                <i class="icon-plus-sign bigger-110"></i>
                                Adicionar Item
                           </asp:LinkButton>                            
                        </div>
                    </div>
                    <br clear="all" />
                    <hr />

                </div>
                </div>
            </div>

        <!-- FIM FORM ADD ITEM -->


        <!-- FORM PAGAMENTO ITEM -->

        <div id="div_Pagamento" class="modal FadeinModal">
            <div class="fadeIn">
            <div class="modal_inside">
                <h3 class="header smaller lighter blue">
                    <div class="btn btn-info btn-mini">
                        <i class="fa-usd bigger-125 icon-only"></i>
                    </div>
                        Pagar Comanda  
                         
                    <i class="icon-double-angle-right"></i> <asp:Label ID="lblPagar_AcomodacaoDescricao" runat="server" Text=""></asp:Label>
                    <asp:Label ID="lblPagar_AcomodacaoID" runat="server" Text=""></asp:Label>
                         
                </h3>

                <div style="float:left; width:100%; height:auto; margin:10px 0px 0px 0px;">
                    <div style="float:left; height:auto; margin-right:10px;">
                        <label for="id-date-picker-1">Forma de Pagamento:</label>
                        <asp:DropDownList ID="ddlPagar_FormaPagamento" runat="server">
                        </asp:DropDownList>
                    </div>
                </div>

                <br clear="all" />
                <div style="float:left; width:100%; height:auto; margin:10px 0px 0px 0px;">
                    <div style="float:left; height:auto; margin-right:2px;">
                        <label for="id-date-picker-1">Desconto</label>
                        <asp:DropDownList ID="ddlPagar_TipoDesconto" runat="server" Width="60px">
                            <asp:ListItem Value="R$" Text="R$"></asp:ListItem>
                        </asp:DropDownList>
                    </div> 
                    <div style="float:left; height:auto; margin-right:10px;">
                        <label for="id-date-picker-1">:</label>
                        <asp:TextBox ID="txtPagar_VlrDesconto" class="ace-tooltip" runat="server" Width="60px" onchange="javascript: calculaDesconto();" />
                    </div> 
                    <div style="float:left; height:auto; margin-right:10px;">
                        <label for="id-date-picker-1">Vlr. Total:</label>
                        <asp:TextBox ID="txtPagar_VlrTotal" class="ace-tooltip" runat="server" Width="100px" ReadOnly="true" />
                    </div> 
                    <div style="float:left; height:auto; margin-right:10px;">
                        <label for="id-date-picker-1">Vlr. Já Pago:</label>
                        <asp:TextBox ID="txtPagar_VlrJaPago" class="ace-tooltip" runat="server" Width="100px" ReadOnly="true"/>
                    </div>
                    <div style="float:left; height:auto; margin-right:10px;">
                        <label for="id-date-picker-1">Vlr. a Pagar:</label>
                        <asp:TextBox ID="txtPagar_VlrAPagar" class="ace-tooltip" runat="server" Width="100px" ReadOnly="true"/>
                    </div> 
                    <div style="float:left; height:auto; margin-right:10px;">
                        <label for="id-date-picker-1">Vlr. Recebido:</label>
                        <asp:TextBox ID="txtPagar_VlrRecebido" class="ace-tooltip" runat="server" Width="100px"  onchange="javascript: calculaTroco();" />
                    </div>   
                    <div style="float:left; height:auto; margin-right:10px;">
                        <label for="id-date-picker-1">Vlr. Troco:</label>
                        <asp:TextBox ID="txtPagar_VlrTroco" class="ace-tooltip" runat="server" Width="100px" />
                    </div>       
                </div>
                <br clear="all" />
                    <div style="float:left; width:100%; height:auto; margin:10px 0px 20px 0px;">
                        <div style="float:left; height:auto; margin-right:10px;">
                            <a href="#" class="btn btn btn-small btn-prev" >
                                <i class="icon-arrow-left"></i>
                                Voltar
                           </a>                          
                        </div>
                        <div style="float:left; height:auto; margin-right:10px;">
                            <asp:LinkButton class="btn btn btn-small btn-info" runat="server" ID="btnPagar" OnClick="btnPagar_LancarMovimento_OnClick" >
                                <i class="icon-plus-sign bigger-110"></i>
                                Pagar
                            </asp:LinkButton>                            
                        </div>    
                    </div>
                <br clear="all" />

                <div class="row-fluid">
                    <div class="table-header"> Movimentos </div>

                    <div id="table_report_wrapper" class="dataTables_wrapper" role="grid">
                    <asp:Repeater ID="rptMovimentos" runat="server">
                        <HeaderTemplate>
                             <table class="table table-striped table-bordered table-hover dataTable" id="table_report" aria-describedby="table_report_info">
								<thead>
									<tr role="row">
                                        <th class="sorting" role="columnheader" tabindex="0" aria-controls="table_report" rowspan="1" colspan="1" style="width: 7%;" aria-label="Domain: activate to sort column ascending">
                                            ID
                                        </th>
                                        <th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="table_report" rowspan="1" colspan="1" style="width: 25%;" aria-label="Status: activate to sort column ascending">
                                            Data e Hora
                                        </th>
                                        <th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="table_report" rowspan="1" colspan="1" style="width: 33%;" aria-label="Status: activate to sort column ascending">
                                            Forma Pagamento
                                        </th>
                                        <th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="table_report" rowspan="1" colspan="1" style="width: 35%;" aria-label="Status: activate to sort column ascending">
                                            Valor Recebido
                                        </th>
                                        <th></th>
                                    </tr>
                               	</thead>								
							<tbody role="alert" aria-live="polite" aria-relevant="all">
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr class='<%# Container.ItemIndex % 2 == 0 ? "odd" : "even" %>'>
							    <td class="">
								    <%# Eval("ID") %>
							    </td>
                                <td class="">
								    <%# Eval("dtHora") %>
							    </td>
                                <td class="">
								    <%# Eval("FormaPagamento")%>
							    </td>
                                <td class="">
								    <%# Eval("Valor")%>
							    </td>
                                <td class="td-actions ">
                                    <div class="hidden-phone visible-desktop btn-group">
                                        <asp:LinkButton class="btn btn-mini btn-danger" runat="server" ID="btnExcluir" ToolTip='<%# "Excluir: " + Eval("ID") %>' CommandArgument='<%# Eval("ID") %>' OnClick="btnExcluirMovimento_OnClick" OnClientClick="javascript:return confirm('Deseja realmente excluir este registro?');" >
                                            <i class="icon-trash bigger-120"></i>
                                        </asp:LinkButton>
                                    </div>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <FooterTemplate>
                                </tbody>
                            </table>

                            <div class="row-fluid">
                                <div class="span6">
                                    <div class="dataTables_paginate paging_bootstrap pagination">
                                        <ul>
                                            <li class="prev">
                                              <asp:LinkButton ID="lnkAnterior" runat="server" OnClick="lnkAnterior_Click" Visible="false">
                                                    <i class="icon-double-angle-left"></i>
                                                </a>
                                            </asp:LinkButton>
                                             <li class="next">
                                                <asp:LinkButton ID="lnkProximo" runat="server" OnClick="lnkProximo_Click" Visible="false"> 
                                                    <i class="icon-double-angle-right"></i>
                                                </asp:LinkButton>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </FooterTemplate>
                    </asp:Repeater>
 

                </div>
            

                </div>            
                <hr />

            </div>
            </div>
        </div>

        <!-- FIM FORM PAGAMENTO -->



        <!-- FORM LIBERAR QUARTO -->

            <div id="div_liberaQuarto" class="modal FadeinModal">
                <div class="fadeIn">
                <div class="modal_inside">
                    <h3 class="header smaller lighter blue">
                        <div class="btn btn-info btn-mini">
                            <i class="icon-flag-alt bigger-150 icon-only"></i>
                        </div>
                         Liberar Quarto  Após a Limpeza
                         <i class="icon-double-angle-right"></i> <asp:Label ID="lblLiberar_AcomodacaoDescricao" runat="server" Text=""></asp:Label>
                         <asp:Label ID="lblLiberar_AcomodacaoID" runat="server" Text=""></asp:Label>
                    </h3>
                    
                    <div style="float:left; width:100%; height:auto; margin:0px 0px 0px 0px;">

                    </div>
                     
                    <div style="float:left; width:100%; height:auto; margin:0px 0px 10px 0px;">
                        <div style="float:left; height:auto; margin-right:10px;">
                            <a href="#" class="btn btn-prev" >
                                <i class="icon-arrow-left"></i>
                                Voltar
                           </a>                          
                        </div>

                        <div style="float:left; height:auto; margin-right:10px;">
                            <asp:LinkButton class="btn btn-info" runat="server" ID="btnLiberarQuarto" OnClick="btnLiberarQuartoSalvar_OnClick">
                                <i class="icon-save bigger-110"></i>
                                Liberar Quarto
                           </asp:LinkButton>                            
                        </div>
                    </div>

                    <hr />

                </div>
                </div>
            </div>

        <!-- FIM FORM LIBERAR QUARTO -->


    <div id="page-content" class="clearfix">
        <div class="page-header position-relative">
            <h1>
                Dashboard
                <small>
                <i class="icon-double-angle-right"></i>
                    Visão geral e estatísticas
                </small>
            </h1>
        </div>

    



        <div class="row-fluid">


            <div style="float:left; width:100%; height:auto; margin:0px 0px 20px 20px;  padding:0px 0px 10px 0px; border-bottom:1px solid #CCCCCC;">
               
                    <div style="float:left; height:auto; margin-right:10px;">
                         <label class="control-label" for="ddlPesquisar_Status">Status:</label>
                         <asp:DropDownList ID="ddlPesquisar_Status" runat="server">
                         </asp:DropDownList>
                    </div>
                    <div style="float:left; height:auto; margin-right:10px;">
                         <label class="control-label" for="ddlPesquisar_TipoAcomodacao">Tipo Acomodação:</label>
                         <asp:DropDownList ID="ddlPesquisar_TipoAcomodacao" runat="server">
                         </asp:DropDownList>
                    </div>
                    <div style="float:left; height:auto; margin-right:10px;">
                        <label class="control-label" for="txtPesquisar_Nome">Nº.:</label>
                        <asp:TextBox ID="txtPesquisar_Nome" class="ace-tooltip" runat="server" Width="60px" />
                    </div>
                    <div style="float:left; height:auto; margin-right:10px;">
                        <label class="control-label" for="txtPesquisar_Descricao">.</label>
                        <asp:LinkButton ID="btnPesquisar" runat="server" CssClass="btn btn-purple btn-small" OnClick="btnPesquisar_OnClick" >
                            <i class="icon-search icon-on-right bigger-110"></i>
                            Pesquisar
                        </asp:LinkButton>
                    </div>
               
            </div>






            <asp:Repeater ID="rptQuartos" runat="server">
                <ItemTemplate>

                    <asp:HiddenField ID="hfStatus" runat="server" Value='<%# Eval("Status") %>' />
                    <asp:HiddenField ID="hfAcomodacaoID" runat="server" Value='<%# Eval("ID") %>' />
                    <asp:HiddenField ID="hfComandaID" runat="server" Value="" />

             
                    <div class="span3">
                      <div class="widget-box collapsed">
                            <div class="widget-header widget-hea1der-small header-color-dark">
                                <h6><%# Eval("Tipo") %></h6>
                            </div>
							<div class='<%# Eval("Class") %>'>
                                <h4>Nº.:  <%# Eval("Nome") %></h4>

								<span class="widget-toolbar">
									<a data-action="collapse" href="#" >
										<i id="itFuncDavi" runat="server" class="icon-chevron-down" ></i>
									</a>
								</span>
							</div>

							<div class="widget-body">
                                <div class="widget-body-inner" style="display: block;">
									<div class="widget-main">
                                        <div id="div_listagemPedidos" runat="server" visible="false">
                                        
                                            <div class="page-header position-relative">
                                                <small>
                                                    <i class="icon-time bigger-120 blue"></i>
                                                     <span style="color:#307ECC;">
                                                    Check-IN:
                                                    </span>
                                                    <asp:Label ID="lblDataHoraEntrada" runat="server" Text=''></asp:Label>
                                               </small>
                                               <br />
                                               <small>
                                                    <div style="float:left; position:relative; margin-right:4px;">
                                                    <i class="icon-time bigger-120 blue"></i>
                                                    </div>
                                                    <div id="TempoDecorridoDescricao" runat="server" style="float:left; position:relative; margin-right:4px; color:#307ECC;">Tempo Decorrido:</div>
                                                    <asp:Label ID="lblTempoDecorrido" runat="server" Text='' Visible="false"></asp:Label>
                                                    <div style="float:left;" id="TempoDecorrido" runat="server"></div>
                                               </small>

                                                <br clear="all" />

                                            </div>

										    <ul class="unstyled spaced2">
                                        
                                            <asp:Repeater ID="rptItens" runat="server">
                                                <ItemTemplate>
                                                        <asp:HiddenField ID="hfComandaID" runat="server" Value='<%# Eval("ID") %>' />
											        <li title='<%# Eval("status") %>'>
												        <i class="icon-ok green"></i>
												        <%# Eval("qtd") %> - <%# Eval("Descricao") %>
											        </li>
                                                </ItemTemplate>
                                            </asp:Repeater>
										    </ul>
                                            <hr>
                                            <div style="text-align:center; font-size:16px;">
                                                   <asp:Label ID="lblTotal" runat="server" Text=''></asp:Label>
                                            </div>
                                        </div>
									</div>
								</div>
                            </div>
                            <div class="color-inverse">
                           
                                <asp:LinkButton runat="server" ID="btnIcon_CheckIN" class='<%# Eval("ClassBtn")%>' Visible="false" CommandArgument='<%# Eval("ID")%>' title="Check-IN" PostBackUrl="#div_CheckIN" OnClick="btnIcon_CheckIN_OnClick" >
                                    <i class="fa fa-sign-in bigger-110 icon-only"></i>
                                </asp:LinkButton>
                                <asp:LinkButton runat="server" ID="btnIcon_AddItem" class='<%# Eval("ClassBtn")%>' Visible="false" CommandArgument='<%# Eval("ID")%>' title="Incluir Item na Comanda" PostBackUrl="#div_addItem" OnClick="btnIcon_AddItem_OnClick">
                                    <i class="fa-plus-square bigger-110 icon-only"></i>
                                </asp:LinkButton>
                                <asp:LinkButton runat="server" ID="btnIcon_PagarComanda" class='<%# Eval("ClassBtn")%>' Visible="false" CommandArgument='<%# Eval("ID")%>' title="Pagar Comanda" PostBackUrl="#div_Pagamento"  OnClick="btnIcon_PagarComanda_OnClick">
                                    <i class="fa-usd bigger-110 icon-only"></i>
                                </asp:LinkButton>
                                <asp:LinkButton runat="server" ID="btnIcon_ImprimirComanda" class='<%# Eval("ClassBtn")%>' Visible="false" CommandArgument='<%# Eval("ID")%>' title="Imprimir Comanda" PostBackUrl="#div_Comanda" OnClick="btnIcon_ImprimirComanda_OnClick">
                                    <i class="icon-print bigger-110 icon-only"></i>
                                </asp:LinkButton>
                                <asp:LinkButton runat="server" ID="btnIcon_LiberarAposLimpeza" class='<%# Eval("ClassBtn")%>' Visible="false" CommandArgument='<%# Eval("ID")%>' title="Liberar quarto após limpeza" PostBackUrl="#div_liberaQuarto" OnClick="btnLiberarQuarto_OnClick"   >
                                    <i class="icon-flag-alt bigger-110 icon-only"></i>
                                </asp:LinkButton>
                            </div>
						</div>
                    </div>
                    
                </ItemTemplate>
            </asp:Repeater>




            <div class="span3">
                
            </div>
        </div>
    </div>

    <div class="div_legendaFlutuante">
        <div class="legend">
        <div style="position: absolute; width: 95px; height: 110px; top: 15px; right: 5px; background-color: rgb(255, 255, 255); opacity: 0.85;"> 
        </div>
        <table style="position:absolute;top:15px;right:5px; font-size:smaller;color:#545454">
            <tbody>
                <tr>
                    <td class="legendLabel">Disponível</td>
                    <td class="legendColorBox">
                        <div style="border:1px solid null;padding:1px">
                        <div style="width:4px;height:0;border:5px solid #68BC31;overflow:hidden"></div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class="legendLabel">Ocupado</td>
                    <td class="legendColorBox">
                        <div style="border:1px solid null;padding:1px">
                        <div style="width:4px;height:0;border:5px solid #2091CF;overflow:hidden"></div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class="legendLabel">Aguardando Limpeza</td>
                    <td class="legendColorBox">
                        <div style="border:1px solid null;padding:1px">
                        <div style="width:4px;height:0;border:5px solid #FEE074;overflow:hidden"></div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class="legendLabel">Aguardando Táxi</td>
                    <td class="legendColorBox">
                        <div style="border:1px solid null;padding:1px">
                        <div style="width:4px;height:0;border:5px solid #AF4E96;overflow:hidden"></div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class="legendLabel">Indisponível</td>
                    <td class="legendColorBox">
                        <div style="border:1px solid null;padding:1px">
                        <div style="width:4px;height:0;border:5px solid #DA5430;overflow:hidden"></div>
                        </div>
                    </td>
                </tr>
            </tbody>
        </table>
        </div>
    </div>
</asp:Content>
